public class Node {
	public int x,y;
	public boolean n,e,s,w;
	public boolean visited;
	
	public Node(int x, int y, boolean us, boolean leftWall, boolean rightWall, int angle) {
		this.x = x;
		this.y = y;
		switch(angle){
		case 0:
			this.n = leftWall;
			this.e = us;
			this.s = rightWall;
			this.w = false;

		break;
		case 90:
			this.n = false;
			this.e = leftWall;
			this.s = us;
			this.w = rightWall;
		break;
		case 180:
			this.n = rightWall;
			this.e = false;
			this.s = leftWall;
			this.w = us;
		break;
		case 270:
			this.n = us;
			this.e = rightWall;
			this.s = false;
			this.w = leftWall;
		break;
		}
	}
	
	public void editNode(boolean us, boolean leftWall, boolean rightWall, int angle) {
		switch(angle){
		case 0:
			this.n = leftWall;
			this.e = us;
			this.s = rightWall;

		break;
		case 90:
			this.e = leftWall;
			this.s = us;
			this.w = rightWall;
		break;
		case 180:
			this.n = rightWall;
			this.s = leftWall;
			this.w = us;
		break;
		case 270:
			this.n = us;
			this.e = rightWall;
			this.w = leftWall;
		break;
		}
	}
}